public class Demo2 implements Runnable{
    @Override
    public void run() {
        System.out.println("这是一个线程");
    }

    public static void main(String[] args) {
        Runnable runnable = new Demo2();
        Thread t = new Thread(runnable);
        t.start();
    }

}
